package com.ys.servers.points.data;

import com.ys.servers.common.data.DataEntity;
import com.ys.servers.common.data.UserType;
import com.ys.servers.common.util.TimeUtils;
import io.vertx.core.json.JsonObject;


/**
 * Created by taotao on 2017/5/10.
 */
public class UserPointsLog extends DataEntity {

    private long userId;

    private UserType userType;

    private String timeDesc;

    private String logDesc;



    public String getTimeDesc() {
        return timeDesc;
    }

    public UserPointsLog setTimeDesc(String timeDesc) {
        this.timeDesc = timeDesc;
        return this;
    }

    private long pointTypeId;

    private long time;

    private int point;


    public long getUserId() {
        return userId;
    }

    public UserPointsLog setUserId(long userId) {
        this.userId = userId;
        return this;
    }

    public UserType getUserType() {
        return userType;
    }

    public UserPointsLog setUserType(UserType userType) {
        this.userType = userType;
        return this;
    }

    public String getLogDesc() {
        return logDesc;
    }

    public UserPointsLog setLogDesc(String logDesc) {
        this.logDesc = logDesc;
        return this;
    }

    public long getPointTypeId() {
        return pointTypeId;
    }

    public UserPointsLog setPointTypeId(long pointTypeId) {
        this.pointTypeId = pointTypeId;
        return this;
    }

    public long getTime() {
        return time;
    }

    public UserPointsLog setTime(long time) {
        this.time = time;
        return setTimeDesc(TimeUtils.getTimeDescWithYYYYMMDD(time));
    }

    public int getPoint() {
        return point;
    }

    public UserPointsLog setPoint(int point) {
        this.point = point;
        return this;
    }

    @Override
    public double getScore() {
        return time;
    }
}
